
<?php if ($mode== "ADD"){?>
<section class="wrapper">
	<!-- page start-->
	<section class="panel">
		<header class="panel-heading"> AWARDS MANAGEMENT </header>
		<div class="panel-body">
			<form class="form-horizontal" role="form" name="news" method="POST"
				action="<?= base_url();?>secure/listing/listings/submit_award/<?= $profile_id;?>">
				<?php
				$this->session->flashdata('message'); {
					$msg = $this->session->flashdata('message');
					echo '<font color="red">' . $msg . '</font>';
				}
				?>
				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Award</label>
					<div class="col-lg-4">
					<span class="text text-danger">
							<?php echo form_error('award'); ?></span>
						<input type="text" class="form-control" id="award" name="award"
							placeholder="Award">
					</div>
				</div>


				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Organization</label>
					<div class="col-lg-4">
					<span class="text text-danger">
							<?php echo form_error('organization'); ?></span>
						<input type="text" class="form-control" id="organization" name="organization"
							placeholder="Organization">
					</div>
				</div>

				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Year</label>
					<div class="col-lg-2">
					<span class="text text-danger">
							<?php echo form_error('year'); ?></span>
						<input type="text" class="form-control" id="year" name="year"
							placeholder="Year">
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-4">
					<input type="hidden" name="profile_id" value="<?= $profile_id?>">
					
						<input type="submit" class="btn btn-info pull-right" value="Add Award"  <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  >
					</div>
				</div>


			</form>
		</div>
		<!-- End of Body Panel -->
	</section>
	
	<section class="panel">
					<header class="panel-heading"> AWARDS MANAGEMENT   </header>
					<div class="panel-body">
						<table class="table table-striped table-advance table-hover">
							<thead>
								<tr>
									<th><i class="icon-bullhorn"></i> Award</th>
									<th class="hidden-phone "><i class="icon-bookmark"></i>
										Organization</th>
									<th><i class="icon-bookmark"></i>Year</th>
									<th><i class=" icon-edit"></i> Action</th>
								</tr>
							</thead>
							<tbody>
							<?php if($awards){?>
							<?php foreach($awards as $awards):?>
								<tr>
									<th><?= $awards->award;?></th>
									<td class="hidden-phone"><?= $awards->organization;?></td>
									<td><?= $awards->year;?></td>
									
									<td>
									
									
										<a href="<?= base_url();?>secure/listing/listings/edit_award/<?= $awards->id; ?>" data-toggle="tooltip" title="Edit" onclick="return confirm('Are you sure you want to Edit?')">
										<button class="btn btn-primary btn-xs">
											<i class="icon-pencil"></i>
										</button>
										</a>
										<a href="<?= base_url();?>secure/listing/listings/delete_award/<?= $awards->id;?>" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  data-toggle="tooltip" title="Delete">
										<button class="btn btn-danger btn-xs">
											<i class="icon-trash "></i>
										</button>
										</a>
									</td>
								</tr>
								
								<?php endforeach;}?>
							</tbody>
						</table>

						<!-- End of Body Panel -->
				</section>
	<!-- page end-->
</section>
<?php }?>
<?php if($mode== "EDIT"){?>

<section class="wrapper">
	<!-- page start-->
	<section class="panel">
		<header class="panel-heading"> AWARDS MANAGEMENT <span class="pull-right"><a href="<?= base_url();?>secure/listing/listings/add_awards/<?= $awards['info']->profile_id;?>" type="button" class="btn btn-success btn-sm">Back</a></span></header>
		<div class="panel-body">
			<form class="form-horizontal" role="form" name="news" method="POST"
				action="<?= base_url();?>secure/listing/listings/update_award">
				<?php
				$this->session->flashdata('message'); {
					$msg = $this->session->flashdata('message');
					echo '<font color="red">' . $msg . '</font>';
				}
				?>
				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Award</label>
					<div class="col-lg-4">
					<span class="text text-danger">
							<?php echo form_error('award'); ?></span>
						<input type="text" class="form-control" id="award" name="award"
							placeholder="Award" value="<?= $awards['info']->award;?>">
					</div>
				</div>


				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Organization</label>
					<div class="col-lg-4">
					<span class="text text-danger">
							<?php echo form_error('organization'); ?></span>
						<input type="text" class="form-control" id="organization" name="organization"
							placeholder="Organization" value="<?= $awards['info']->organization;?>">
					</div>
				</div>

				<div class="form-group">
					<label for="input" class="col-lg-2 control-label">Year</label>
					<div class="col-lg-2">
					<span class="text text-danger">
							<?php echo form_error('year'); ?></span>
						<input type="text" class="form-control" id="year" name="year"
							placeholder="Year" value="<?= $awards['info']->year;?>">
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-4">
					<input type="hidden" name="id" value="<?= $awards['info']->id;?>">
					<input type="submit" class="btn btn-info pull-right" value="Update"  <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  >
					</div>
				</div>


			</form>
		</div>
		<!-- End of Body Panel -->
	</section>
	</section>



<?php }?>